package com.selectTree;

public class CompostiePattern {
    public static void main(String[] args) {
        Composite china = new Composite();
        china.add(new City(1000));
        china.add(new City(2000));

        Composite Shanxi = new Composite();
        Shanxi.add(new City(3000));
        Shanxi.add(new City(3000));

        china.add(Shanxi);

        System.out.println(china.count());
    }
}
